| Summary: | Font changing with DCOP or Schema | ||
|---|---|---|---|
| Product: | [Applications] konsole | Reporter: | Thomas Eriksson <thomas.eriksson> |
| Component: | general | Assignee: | Konsole Bugs <konsole-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | wishlist | ||
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | Ubuntu | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
| Attachments: | Patch to add DCOP calls for settings font | ||
|
Description
Thomas Eriksson
2006-03-09 11:59:49 UTC
Created attachment 15939 [details]
Patch to add DCOP calls for settings font
Too late to make it into KDE 3.5.3.
% dcop konsole-19829 session-1 font
DejaVu Sans Mono,14,-1,5,50,0,0,0,0,0
% dcop konsole-19829 session-1 setFont Cheq,8,-1,5,50,0,0,0,0,0
% dcop konsole-19829 session-1 font
Cheq,8,-1,5,50,0,0,0,0,0
SVN commit 538057 by hindenburg:
Add DCOP calls for font. Can not test on /trunk right now.
CCBUG: 123325
M +14 -0 session.cpp
M +2 -0 session.h
M +2 -0 sessioniface.h
--- trunk/KDE/kdebase/apps/konsole/konsole/session.cpp #538056:538057
@@ -750,6 +750,20 @@
emit setSessionSchema(this, schema);
}
+QString TESession::font()
+{
+ return te->getVTFont().toString();
+}
+
+void TESession::setFont(const QString &font)
+{
+ QFont tmp;
+ if (tmp.fromString(font))
+ te->setVTFont(tmp);
+ else
+ kdWarning()<<"unknown font: "<<font<<endl;
+}
+
QString TESession::encoding()
{
return em->codec()->name();
--- trunk/KDE/kdebase/apps/konsole/konsole/session.h #538056:538057
@@ -114,6 +114,8 @@
void setKeytab(const QString &keytab);
QSize size();
void setSize(QSize size);
+ void setFont(const QString &font);
+ QString font();
public Q_SLOTS:
--- trunk/KDE/kdebase/apps/konsole/konsole/sessioniface.h #538056:538057
@@ -25,6 +25,8 @@
virtual void setKeytab(const QString &keyboard) =0;
virtual QSize size() =0;
virtual void setSize(QSize size) =0;
+ virtual QString font() =0;
+ virtual void setFont(const QString &font) =0;
};
#endif // SESSIONIFACE_H
SVN commit 549730 by hindenburg:
Add DCOP calls setFont() and font().
BUG: 123325
M +14 -0 session.cpp
M +2 -0 session.h
M +2 -0 sessioniface.h
--- branches/KDE/3.5/kdebase/konsole/konsole/session.cpp #549729:549730
@@ -764,6 +764,20 @@
emit setSessionSchema(this, schema);
}
+QString TESession::font()
+{
+ return te->getVTFont().toString();
+}
+
+void TESession::setFont(const QString &font)
+{
+ QFont tmp;
+ if (tmp.fromString(font))
+ te->setVTFont(tmp);
+ else
+ kdWarning()<<"unknown font: "<<font<<endl;
+}
+
QString TESession::encoding()
{
return em->codec()->name();
--- branches/KDE/3.5/kdebase/konsole/konsole/session.h #549729:549730
@@ -113,6 +113,8 @@
void setKeytab(const QString &keytab);
QSize size();
void setSize(QSize size);
+ void setFont(const QString &font);
+ QString font();
public slots:
--- branches/KDE/3.5/kdebase/konsole/konsole/sessioniface.h #549729:549730
@@ -24,6 +24,8 @@
virtual void setKeytab(const QString &keyboard) =0;
virtual QSize size() =0;
virtual void setSize(QSize size) =0;
+ virtual QString font() =0;
+ virtual void setFont(const QString &font) =0;
};
#endif // SESSIONIFACE_H
|